//
//  ETVCrentObjectTableViewCell.m
//  Jyxt
//
//  Created by 宫璞 on 2017/9/8.
//  Copyright © 2017年 DaLian Rental Housing Management. All rights reserved.
//

#import "ETVCrentObjectTableViewCell.h"
#import "Hcolors.h"
@implementation ETVCrentObjectTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.addressLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 80, 24)];
        self.addressLabel.textColor = COLOR_NEW_153;
        self.addressLabel.text = @"地址";
        self.addressLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.addressLabel];
        
        self.detailAddressLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.addressLabel.frame.origin.x + self.addressLabel.frame.size.width + 10, 10, [UIScreen mainScreen].bounds.size.width - 80 - 10 - 10 - 10, 24)];
        self.detailAddressLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.detailAddressLabel];
        
        self.zeroLineLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 44, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.zeroLineLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.zeroLineLabel];
        
        self.chanquanLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.zeroLineLabel.frame.origin.y + self.zeroLineLabel.frame.size.height  +10, 80, 24)];
        self.chanquanLabel.text = @"产权类型";
        self.chanquanLabel.textColor = COLOR_NEW_153;
        self.chanquanLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.chanquanLabel];
        
        self. detailChanquanLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.chanquanLabel.frame.origin.x + self.chanquanLabel.frame.size.width + 10, self.zeroLineLabel.frame.origin.y + self.zeroLineLabel.frame.size.height  +10, [UIScreen mainScreen].bounds.size.width - 10 - 10 - 80, 24)];
        self.detailChanquanLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.detailChanquanLabel];
        
        self.lineOneLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 88.5, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineOneLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineOneLabel];
        
        self.rentStyleLable = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineOneLabel.frame.origin.y + self.lineOneLabel.frame.size.height + 10, 80, 24)];
        self.rentStyleLable.text = @"出租方式";
        self.rentStyleLable.textColor = COLOR_NEW_153;
        self.rentStyleLable.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.rentStyleLable];
        
        self.detailRentStyleLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.rentStyleLable.frame.origin.x + self.rentStyleLable.frame.size.width + 10, self.lineOneLabel.frame.origin.y + self.lineOneLabel.frame.size.height + 10, 100, 24)];
        self.detailRentStyleLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.detailRentStyleLabel];
        
        self.lineTwoLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 133, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineTwoLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineTwoLabel];
        
        self.rentAreaLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineTwoLabel.frame.origin.y + self.lineTwoLabel.frame.size.height + 10, 80, 24)];
        self.rentAreaLabel.text = @"出租区域";
        self.rentAreaLabel.textColor = COLOR_NEW_153;
        self.rentAreaLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.rentAreaLabel];
        
        self.detailRentAreaLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.rentAreaLabel.frame.origin.x + self.rentAreaLabel.frame.size.width + 10, self.lineTwoLabel.frame.origin.y + self.lineTwoLabel.frame.size.height + 10, [UIScreen mainScreen].bounds.size.width - 10 - 120, 24)];
        self.detailRentAreaLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.detailRentAreaLabel];
        
        self.lineThreeLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 177.5, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineThreeLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineThreeLabel];
        
        self.houseStrucerLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineThreeLabel.frame.origin.y + self.lineThreeLabel.frame.size.height + 10, 80, 24)];
        self.houseStrucerLabel.text = @"房屋结构";
        self.houseStrucerLabel.textColor = COLOR_NEW_153;
        self.houseStrucerLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.houseStrucerLabel];
        
        self.detailHouseStructerLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.houseStrucerLabel.frame.origin.x + self.houseStrucerLabel.frame.size.width + 10, self.lineThreeLabel.frame.origin.y + self.lineThreeLabel.frame.size.height + 10, [UIScreen mainScreen].bounds.size.width - self.houseStrucerLabel.frame.size.width - 10, 24)];
        self.detailHouseStructerLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.detailHouseStructerLabel];
        
        
    }
    return self;
}


- (void)setContent:(McontractDetailModel *)contractThreeSextion{
    self. detailAddressLabel.text = contractThreeSextion.houseAddr;
    self.detailChanquanLabel.text = contractThreeSextion.propertyType;
    self.detailRentStyleLabel.text = contractThreeSextion.rentalMode;
    self.detailRentAreaLabel.text = contractThreeSextion.leaseDomain;
    self.detailHouseStructerLabel.text = contractThreeSextion.houseStructure;
}


@end
